<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html >
<html>
<head>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="<%=basePath %>bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="<%=basePath %>bootstrap/css/bootstrap.css" rel="stylesheet" />
<script src="<%=basePath %>bootstrap/js/jquery-1.6.2.js"></script>
<script src="<%=basePath %>bootstrap/js/jquery.min.js"></script>
<script src="<%=basePath %>bootstrap/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath %>logined/js/jquery-easyui-1.3.5/themes/gray/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=basePath %>logined/js/jquery-easyui-1.3.5/themes/icon.css" />
<script type="text/javascript" src="<%=basePath %>logined/js/jquery-easyui-1.3.5/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="<%=basePath %>logined/js/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
<style type="text/css">
	label{
		text-align: right;
	}
</style>
</head>
<body>
	<div>
	 <div id="tt_btn" style="margin-top: 15px;">
      <a href="ModifyStudent?opt=2"  id="save" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
      <a  href="ModifyStudent?opt=3" class="easyui-linkbutton my-search-button" iconCls="icon-search" plain="true">查询</a> 
     </div>
		<div class="bs-example">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>#</th>
						<th>学号</th>
						<th>姓名</th>
						<th>性别</th>
						<th>年龄</th>
						<th>联系方式</th>
						<th>地址</th>
						<th>修改</th>
						<th>删除</th>
					</tr>
				</thead>
				<tbody>
				
				<c:forEach items="${sessionScope.lstStus }" var="eachStu" varStatus="st">
						<input type="hidden"  id="txtUserid" name="txtUserid"	value="${eachStu.stuId }">
					<tr>
						<td>${st.index+1 }</td>			
						<td>${eachStu.stuCode }</td>
						<td>${eachStu.stuName }</td>
						<td>${eachStu.sex }</td>
						<td>${eachStu.age }</td>
						<td>${eachStu.phone }</td>
						<td>${eachStu.address }</td>
						<td><a href="ModifyStudent?stuId=${eachStu.stuId }&opt=0">修改</a></td>
						<td><a href="ModifyStudent?stuCode=${eachStu.stuCode }&opt=1" 
						               onclick="return confirm('您确认删除用户${eachStu.stuCode }的信息么？');">删除</a></td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
</body>
	
</html>